package com.durian.house.service.impl;

import java.util.List;
import com.durian.common.core.utils.DateUtils;
import com.durian.system.api.domain.house.PremisesInfo;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.durian.house.mapper.PremisesInfoMapper;
import com.durian.house.service.IPremisesInfoService;

/**
 * 楼盘信息Service业务层处理
 * 
 * @author durian
 * @date 2022-06-22
 */
@Service
public class PremisesInfoServiceImpl implements IPremisesInfoService 
{
    @Autowired
    private PremisesInfoMapper premisesInfoMapper;

    /**
     * 查询楼盘信息
     * 
     * @param id 楼盘信息主键
     * @return 楼盘信息
     */
    @Override
    public PremisesInfo selectPremisesInfoById(Long id)
    {
        return premisesInfoMapper.selectPremisesInfoById(id);
    }

    /**
     * 查询楼盘信息列表
     * 
     * @param premisesInfo 楼盘信息
     * @return 楼盘信息
     */
    @Override
    public List<PremisesInfo> selectPremisesInfoList(PremisesInfo premisesInfo)
    {
        return premisesInfoMapper.selectPremisesInfoList(premisesInfo);
    }

    /**
     * 新增楼盘信息
     * 
     * @param premisesInfo 楼盘信息
     * @return 结果
     */
    @Override
    public int insertPremisesInfo(PremisesInfo premisesInfo)
    {
        return premisesInfoMapper.insertPremisesInfo(premisesInfo);
    }

    /**
     * 修改楼盘信息
     * 
     * @param premisesInfo 楼盘信息
     * @return 结果
     */
    @Override
    public int updatePremisesInfo(PremisesInfo premisesInfo)
    {
        premisesInfo.setUpdateTime(DateUtils.getNowDate());
        return premisesInfoMapper.updatePremisesInfo(premisesInfo);
    }

    /**
     * 批量删除楼盘信息
     * 
     * @param ids 需要删除的楼盘信息主键
     * @return 结果
     */
    @Override
    public int deletePremisesInfoByIds(Long[] ids)
    {
        return premisesInfoMapper.deletePremisesInfoByIds(ids);
    }

    /**
     * 删除楼盘信息信息
     * 
     * @param id 楼盘信息主键
     * @return 结果
     */
    @Override
    public int deletePremisesInfoById(Long id)
    {
        return premisesInfoMapper.deletePremisesInfoById(id);
    }
}
